package com.qf.pojo;

import java.time.LocalDateTime;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;

public class Order {
    /*
    *
FieldTypeComment
oidvarchar(32) NOT NULL
ordertimedatetime NULL
totaldouble NULL
stateint(11) NULL
addressvarchar(30) NULL
namevarchar(20) NULL
telephonevarchar(20) NULL
uidvarchar(32) NULL
    * */
    private String oid;//订单编号
    private LocalDateTime ordertime;//下订单时间(时间戳)
    private Double total;//订单总金额
    private int state;//支付状态(默认值是0,未支付.1代表已支付)
    private String address;//收货地址
    private String name;//收货人姓名
    private String telephone;//收货人电话
    private User user;//表示该订单属于谁
    private List<OrderItem> items = new LinkedList<>();//存储订单中的众多订单项

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public LocalDateTime getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(LocalDateTime ordertime) {
        this.ordertime = ordertime;
    }

    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        this.total = total;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<OrderItem> getItems() {
        return items;
    }

    public void setItems(List<OrderItem> items) {
        this.items = items;
    }

}
